a = []
print("请输入要求的俩个数：")
for i in range(2):
    a.append(input())

def evalnum(c):
    z = []
    for j in range(c):
        if c % (j + 1) == 0 and j+1 not in [1, c]:
            z.append(j + 1)
    return z

b = evalnum(int(a[0]))
c = evalnum(int(a[1]))
d = []
cc = []
for x in range(len(b)):
    if b[x] in c:
        d.append(b[x])
if len(d) == 1:
    cc = d
else:
    for bc in range(len(d)-1):
        if d[bc] > d[bc+1]:
            cc = d[bc]
        else:
            cc = cc
print("这俩数的最大公约数为：", cc[0])
print("这俩数的最小公倍数为：", eval(a[0])*eval(a[1])/cc[0])
